﻿using Validate.Library;

namespace Authority.Model
{
    /// <summary>
    /// 用户增加操作请求信息
    /// </summary>
    public class UserAddRequest
    {

        /// <summary>
        /// 登录账号
        /// </summary>
        [Validate(ValidateType.NotEmpty | ValidateType.MaxLength, MaxLength = 50, Description = "登录账号")]
        public string sLoginName { get; set;}

        /// <summary>
        /// 联系人
        /// </summary>
        [Validate(ValidateType.NotEmpty | ValidateType.MaxLength, MaxLength = 50, Description = "联系人")]
        public string sUserName { get; set;}

        /// <summary>
        ///性别 1男 2女 0未知 
        /// </summary>
        [Validate(ValidateType.NotEmpty | ValidateType.MatchingRegex, Regex = ValidateRegex.Number, Description = "性别")]
        public int iSex { get; set; }

        /// <summary>
        /// 联系电话
        /// </summary>
        [Validate(ValidateType.NotEmpty | ValidateType.MatchingRegex, Regex = ValidateRegex.TelphoneOrMobile, Description = "联系电话")]
        public string sPhone { get; set; }

        /// <summary>
        /// 头像地址
        /// </summary>
        [Validate(ValidateType.NotEmpty | ValidateType.MaxLength, MaxLength = 200, Description = "头像地址")]
        public string sPicUrl { get; set; }

        /// <summary>
        /// 密码
        /// </summary>
        [Validate(ValidateType.NotEmpty | ValidateType.MaxLength, MaxLength = 20, Description = "密码")]
        public string sPassword { get; set; }

        /// <summary>
        /// 重复密码
        /// </summary>
        [Validate(ValidateType.NotEmpty | ValidateType.MaxLength, MaxLength = 20, Description = "重复密码")]
        public string sRepeatPassword { get; set; }

        /// <summary>
        /// 状态 是否冻结 0未冻结  1已经冻结
        /// </summary>
        [Validate(ValidateType.NotEmpty | ValidateType.MatchingRegex, Regex = ValidateRegex.Number, Description = "状态")]
        public int iState { get; set; }

        /// <summary>
        /// 所属角色
        /// </summary>
        [Validate(ValidateType.NotEmpty, Description = "所属角色")]
        public  string  sRoleList { get; set; }

        /// <summary>
        /// 所属部门
        /// </summary>
        [Validate(ValidateType.NotEmpty, Description = "所属部门")]
        public string sDepartmentList { get; set; }

        /// <summary>
        /// 所属岗位
        /// </summary>
        [Validate(ValidateType.NotEmpty, Description = "所属岗位")]
        public string sPostList { get; set; }

    }
}
